$(function(){
	$.get("list.json",function(data){
		var html = "";
		$.each(data,function(i,o){
			html += "<li>"
						+"<a href=\"goodsContent.html\">"
							+"<span class=\"while_link\">"
								+"<img data-original=\""+o.img+"\" style=\"display:block;\">"
							+"</span>"
							+"<div class=\"while_wrap\">"
								+"<span class=\"while_name\">"
									+"<img src=\"img/23_100x100.png\" class=\"while_icon\" width=\"22\" height=\"22\">美国直采 杭州保税仓发货</span>"					
								
								+"<p class=\"while_text\">Happy Baby禧贝 蔬菜泡芙42g*10盒+香蕉泡芙42g*10盒 共20盒</p>"
													
								+"<div class=\"while_price clearfix\">"
									+"<em class=\"while_yen\">￥</em>"
									+"<b class=\"while_min\">"+o.price+"</b>"
								+"</div>"
								+"<del class=\"while_max\">￥580.00</del>"
							+"</div>"
							+"<span class=\"while_buy\">立即抢购</span>"
						
						+"</a>"
					+"</li>"
		});
		$(".main_pro_while").html(html);
		$("img").lazyload({
			effect:"fadeIn",
			threshold:20,
			placeholder:"img/TB1fkyVJpXXXXbbXpXX7WcCNVXX-400-400.png"
		});
	});
});

$(window).on('beforeunload',function(){
	return "主人~确定要离开页面么？";
});